package com.admin.boot.common.aop;

import com.admin.boot.common.exception.AdminBootOnlineDevException;
import com.admin.boot.common.utils.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @version v3.0
 * @Description: TODO
 * @author: jeecg-boot
 * @date: 2024-01-11
 */
@RestControllerAdvice
public class ControllerAdvice {

    @ExceptionHandler(AdminBootOnlineDevException.class)
    public Result<?> handleException(AdminBootOnlineDevException e){
        e.printStackTrace();
        return Result.error(e.getMessage());
    }
}
